package com.oa.system.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

@ApiModel("")
@Data
public class ApprovalProcessAddDTO {

    @ApiModelProperty(value = "Code")
    @NotNull(message = "ID不能为空")
    private String id;

    @ApiModelProperty(value = "流程名称")
    @NotNull(message = "流程名称不能为空")
    private String processName;

    @ApiModelProperty(value = "备注")
    private String remake;

    @ApiModelProperty(value = "更新时间  yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @ApiModelProperty("流程方案列表")
    @NotNull(message = "流程方案列表不能为空")
    private List<ApprovalPlanAddDTO> approvalPlans;

    @ApiModelProperty("处理后节点")
    @NotNull(message = "处理后节点不能为空")
    private List<ApprovalAfterHandleAddDTO> approvalAfterHandles;
}
